﻿
namespace Fayshine.VA.RIAService.Web
{
    using System;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.ComponentModel.DataAnnotations;
    using System.Data.Objects.DataClasses;
    using System.Linq;
    using System.ServiceModel.DomainServices.Hosting;
    using System.ServiceModel.DomainServices.Server;


    // The MetadataTypeAttribute identifies roleMetadata as the class
    // that carries additional metadata for the role class.
    [MetadataTypeAttribute(typeof(role.roleMetadata))]
    public partial class role
    {

        // This class allows you to attach custom attributes to properties
        // of the role class.
        //
        // For example, the following marks the Xyz property as a
        // required property and specifies the format for valid values:
        //    [Required]
        //    [RegularExpression("[A-Z][A-Za-z0-9]*")]
        //    [StringLength(32)]
        //    public string Xyz { get; set; }
        internal sealed class roleMetadata
        {

            // Metadata classes are not meant to be instantiated.
            private roleMetadata()
            {
            }

            public int ID { get; set; }

            public string Title { get; set; }

            [Include]
            [Association("user", "ID", "RoleID")]
            public EntityCollection<user> users { get; set; }
        }
    }

    // The MetadataTypeAttribute identifies userMetadata as the class
    // that carries additional metadata for the user class.
    [MetadataTypeAttribute(typeof(user.userMetadata))]
    public partial class user
    {

        // This class allows you to attach custom attributes to properties
        // of the user class.
        //
        // For example, the following marks the Xyz property as a
        // required property and specifies the format for valid values:
        //    [Required]
        //    [RegularExpression("[A-Z][A-Za-z0-9]*")]
        //    [StringLength(32)]
        //    public string Xyz { get; set; }
        internal sealed class userMetadata
        {

            // Metadata classes are not meant to be instantiated.
            private userMetadata()
            {
            }

            public string CHNName { get; set; }

            public int ID { get; set; }

            public string Name { get; set; }

            public string Password { get; set; }

            [Include]
            public role role { get; set; }

            public Nullable<int> RoleID { get; set; }
        }
    }
}
